<?php
/**
 * Class Express
 * Desc  快递商家Controller
 * Create on 2021/8/25 14:59
 * Create by wangyafang
 */

namespace app\api\controller\xyb;



class Express extends Base
{
    protected $noNeedLogin = ['index'];
    // 无需鉴权的接口,*表示全部
    protected $noNeedRight = ['*'];

    public function _initialize(){
        parent::_initialize();
        $this->model = new \app\api\model\xyb\Express();
    }

    /**
     * desc:快递商家列表
     */
    public function index()
    {
        if(!$this->request->isPost()) {
            $this->error('请求类型错误');
        }

        $where['agent_id'] = array('eq',$this->request->param('agent_id'));
        $where['status'] = array('eq','normal');
        $data = $this->model->getList($this->model,$where,'id,name');
        $this->success('请求成功',$data);
    }
}